package com.example.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/user")
public class userController {

    @RequestMapping("/login")
    public String login(String userName, HttpSession session){
        session.setAttribute("userName",userName);
        return "main";
    }
}
